<html xmlns:th="http://www.thymeleaf.org" class="x-admin-sm">
<head>
    <script src="/js/jquery-3.4.1.js"></script>
    <script src="/lib/layui/layui.js"></script>
    <script src="/js/xadmin.js"></script>

    <!-- 最新版本的 Bootstrap 核心 CSS 文件 -->
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap.min.css"
          integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">

    <!-- 可选的 Bootstrap 主题文件（一般不用引入） -->
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap-theme.min.css"
          integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">

    <!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/js/bootstrap.min.js"
            integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa"
            crossorigin="anonymous"></script>

</head>
<body>
<div class="row" style="width: 90%; margin-left: 5%">
    <form method="post" class="layui-form" action="/self/store/save">
        <input type="hidden" name="id" th:value="${store?.id}">
        <h3>店铺信息</h3>
        <div class="form-group">
            <label>核审状态</label>
            <input type="text" class="form-control" id="auditstatus" name="auditstatus"  th:if="${store?.auditstatus != 1}" value="未通过" placeholder="核审状态"  disabled>
            <input type="text" class="form-control" id="" name="auditstatus"  th:if="${store?.auditstatus == 1}" value="已通过" placeholder="核审状态"  disabled>
        </div>
        <div class="form-group">
            <label>店铺名</label>
            <input type="text" class="form-control" id="name" name="name" th:value="${store?.name}" placeholder="店铺名" >
        </div>
        <div class="form-group">
            <label>经营类型</label>
            <select name="type">
                <option value="1" th:selected="${store?.type == 1? 'selected':''}">个人/个体</option>
                <option value="2" th:selected="${store?.type == 2? 'selected':''}">公司/集团</option>
            </select>
        </div>
        <div class="form-group">
            <label>社会信用统一代码</label>
            <input type="text" class="form-control" id="carid" name="carid" th:value="${store?.carid}" placeholder="社会信用统一代码" >
        </div>
        <div class="form-group">
            <label>营业执照有效期（开始）</label>
            <input type="text" class="form-control" id="start" name="start" th:value="${#dates.format(store?.start, 'yyyy-MM-dd')}" placeholder="营业执照有效期（开始）" >
        </div>
        <div class="form-group">
            <label>营业执照有效期（结束）</label>
            <input type="text" class="form-control" id="end" name="end" th:value="${#dates.format(store?.end, 'yyyy-MM-dd')}" placeholder="营业执照有效期（结束）" >
        </div>
        <div class="form-group">
            <label>注册时间</label>
            <input type="text" class="form-control" id="register" name="register" th:value="${store?.register}" placeholder="注册时间" disabled >
        </div>
        <div class="form-group">
            <label>经营范围</label>
            <input type="text" class="form-control" id="range" name="range" th:value="${store?.range}" placeholder="经营范围" >
        </div>
        <div class="form-group">
            <label>地址</label>
            <input type="text" class="form-control" id="address" name="address" th:value="${store?.address}" placeholder="地址" >
        </div>
        <input type="submit" value="提交" class="btn btn-default" >
    </form>
</div>
<script>
    function doSubmit() {

    }
    layui.use('laydate', function(){
        var laydate = layui.laydate;

        //执行一个laydate实例
        laydate.render({
            elem: '#start' //指定元素
        });
        laydate.render({
            elem: '#end' //指定元素
        });
    });
</script>
</body>
</html>
